Integrand size = 31, antiderivative size = 138 \[ \int \sec ^2(c+d x) (a+a \sec (c+d x))^2 (A+B \sec (c+d x)) \, dx=\frac {a^2 (8 A+7 B) \text {arctanh}(\sin (c+d x))}{8 d}+\frac {a^2 (8 A+7 B) \tan (c+d x)}{6 d}+\frac {a^2 (8 A+7 B) \sec (c+d x) \tan (c+d x)}{24 d}+\frac {(4 A-B) (a+a \sec (c+d x))^2 \tan (c+d x)}{12 d}+\frac {B (a+a \sec (c+d x))^3 \tan (c+d x)}{4 a d} \]
1/8*a^2*(8*A+7*B)*arctanh(sin(d*x+c))/d+1/6*a^2*(8*A+7*B)*tan(d*x+c)/d+1/2 4*a^2*(8*A+7*B)*sec(d*x+c)*tan(d*x+c)/d+1/12*(4*A-B)*(a+a*sec(d*x+c))^2*ta n(d*x+c)/d+1/4*B*(a+a*sec(d*x+c))^3*tan(d*x+c)/a/d
Time = 0.84 (sec) , antiderivative size = 85, normalized size of antiderivative = 0.62 \[ \int \sec ^2(c+d x) (a+a \sec (c+d x))^2 (A+B \sec (c+d x)) \, dx=\frac {a^2 \left (3 (8 A+7 B) \text {arctanh}(\sin (c+d x))+\left (8 (5 A+4 B)+3 (8 A+7 B) \sec (c+d x)+8 (A+2 B) \sec ^2(c+d x)+6 B \sec ^3(c+d x)\right ) \tan (c+d x)\right )}{24 d} \]
(a^2*(3*(8*A + 7*B)*ArcTanh[Sin[c + d*x]] + (8*(5*A + 4*B) + 3*(8*A + 7*B) *Sec[c + d*x] + 8*(A + 2*B)*Sec[c + d*x]^2 + 6*B*Sec[c + d*x]^3)*Tan[c + d *x]))/(24*d)
Time = 0.85 (sec) , antiderivative size = 137, normalized size of antiderivative = 0.99, number of steps used = 13, number of rules used = 12, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.387, Rules used = {3042, 4498, 3042, 4489, 3042, 4275, 3042, 4254, 24, 4534, 3042, 4257}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \sec ^2(c+d x) (a \sec (c+d x)+a)^2 (A+B \sec (c+d x)) \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \csc \left (c+d x+\frac {\pi }{2}\right )^2 \left (a \csc \left (c+d x+\frac {\pi }{2}\right )+a\right )^2 \left (A+B \csc \left (c+d x+\frac {\pi }{2}\right )\right )dx\) |
\(\Big \downarrow \) 4498 |
\(\displaystyle \frac {\int \sec (c+d x) (\sec (c+d x) a+a)^2 (3 a B+a (4 A-B) \sec (c+d x))dx}{4 a}+\frac {B \tan (c+d x) (a \sec (c+d x)+a)^3}{4 a d}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\int \csc \left (c+d x+\frac {\pi }{2}\right ) \left (\csc \left (c+d x+\frac {\pi }{2}\right ) a+a\right )^2 \left (3 a B+a (4 A-B) \csc \left (c+d x+\frac {\pi }{2}\right )\right )dx}{4 a}+\frac {B \tan (c+d x) (a \sec (c+d x)+a)^3}{4 a d}\) |
\(\Big \downarrow \) 4489 |
\(\displaystyle \frac {\frac {1}{3} a (8 A+7 B) \int \sec (c+d x) (\sec (c+d x) a+a)^2dx+\frac {a (4 A-B) \tan (c+d x) (a \sec (c+d x)+a)^2}{3 d}}{4 a}+\frac {B \tan (c+d x) (a \sec (c+d x)+a)^3}{4 a d}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\frac {1}{3} a (8 A+7 B) \int \csc \left (c+d x+\frac {\pi }{2}\right ) \left (\csc \left (c+d x+\frac {\pi }{2}\right ) a+a\right )^2dx+\frac {a (4 A-B) \tan (c+d x) (a \sec (c+d x)+a)^2}{3 d}}{4 a}+\frac {B \tan (c+d x) (a \sec (c+d x)+a)^3}{4 a d}\) |
\(\Big \downarrow \) 4275 |
\(\displaystyle \frac {\frac {1}{3} a (8 A+7 B) \left (2 a^2 \int \sec ^2(c+d x)dx+\int \sec (c+d x) \left (\sec ^2(c+d x) a^2+a^2\right )dx\right )+\frac {a (4 A-B) \tan (c+d x) (a \sec (c+d x)+a)^2}{3 d}}{4 a}+\frac {B \tan (c+d x) (a \sec (c+d x)+a)^3}{4 a d}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\frac {1}{3} a (8 A+7 B) \left (2 a^2 \int \csc \left (c+d x+\frac {\pi }{2}\right )^2dx+\int \csc \left (c+d x+\frac {\pi }{2}\right ) \left (\csc \left (c+d x+\frac {\pi }{2}\right )^2 a^2+a^2\right )dx\right )+\frac {a (4 A-B) \tan (c+d x) (a \sec (c+d x)+a)^2}{3 d}}{4 a}+\frac {B \tan (c+d x) (a \sec (c+d x)+a)^3}{4 a d}\) |
\(\Big \downarrow \) 4254 |
\(\displaystyle \frac {\frac {1}{3} a (8 A+7 B) \left (\int \csc \left (c+d x+\frac {\pi }{2}\right ) \left (\csc \left (c+d x+\frac {\pi }{2}\right )^2 a^2+a^2\right )dx-\frac {2 a^2 \int 1d(-\tan (c+d x))}{d}\right )+\frac {a (4 A-B) \tan (c+d x) (a \sec (c+d x)+a)^2}{3 d}}{4 a}+\frac {B \tan (c+d x) (a \sec (c+d x)+a)^3}{4 a d}\) |
\(\Big \downarrow \) 24 |
\(\displaystyle \frac {\frac {1}{3} a (8 A+7 B) \left (\int \csc \left (c+d x+\frac {\pi }{2}\right ) \left (\csc \left (c+d x+\frac {\pi }{2}\right )^2 a^2+a^2\right )dx+\frac {2 a^2 \tan (c+d x)}{d}\right )+\frac {a (4 A-B) \tan (c+d x) (a \sec (c+d x)+a)^2}{3 d}}{4 a}+\frac {B \tan (c+d x) (a \sec (c+d x)+a)^3}{4 a d}\) |
\(\Big \downarrow \) 4534 |
\(\displaystyle \frac {\frac {1}{3} a (8 A+7 B) \left (\frac {3}{2} a^2 \int \sec (c+d x)dx+\frac {2 a^2 \tan (c+d x)}{d}+\frac {a^2 \tan (c+d x) \sec (c+d x)}{2 d}\right )+\frac {a (4 A-B) \tan (c+d x) (a \sec (c+d x)+a)^2}{3 d}}{4 a}+\frac {B \tan (c+d x) (a \sec (c+d x)+a)^3}{4 a d}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\frac {1}{3} a (8 A+7 B) \left (\frac {3}{2} a^2 \int \csc \left (c+d x+\frac {\pi }{2}\right )dx+\frac {2 a^2 \tan (c+d x)}{d}+\frac {a^2 \tan (c+d x) \sec (c+d x)}{2 d}\right )+\frac {a (4 A-B) \tan (c+d x) (a \sec (c+d x)+a)^2}{3 d}}{4 a}+\frac {B \tan (c+d x) (a \sec (c+d x)+a)^3}{4 a d}\) |
\(\Big \downarrow \) 4257 |
\(\displaystyle \frac {\frac {1}{3} a (8 A+7 B) \left (\frac {3 a^2 \text {arctanh}(\sin (c+d x))}{2 d}+\frac {2 a^2 \tan (c+d x)}{d}+\frac {a^2 \tan (c+d x) \sec (c+d x)}{2 d}\right )+\frac {a (4 A-B) \tan (c+d x) (a \sec (c+d x)+a)^2}{3 d}}{4 a}+\frac {B \tan (c+d x) (a \sec (c+d x)+a)^3}{4 a d}\) |
(B*(a + a*Sec[c + d*x])^3*Tan[c + d*x])/(4*a*d) + ((a*(4*A - B)*(a + a*Sec [c + d*x])^2*Tan[c + d*x])/(3*d) + (a*(8*A + 7*B)*((3*a^2*ArcTanh[Sin[c + d*x]])/(2*d) + (2*a^2*Tan[c + d*x])/d + (a^2*Sec[c + d*x]*Tan[c + d*x])/(2 *d)))/3)/(4*a)
3.1.54.3.1 Defintions of rubi rules used
Int[csc[(c_.) + (d_.)*(x_)]^(n_), x_Symbol] :> Simp[-d^(-1) Subst[Int[Exp andIntegrand[(1 + x^2)^(n/2 - 1), x], x], x, Cot[c + d*x]], x] /; FreeQ[{c, d}, x] && IGtQ[n/2, 0]
Int[csc[(c_.) + (d_.)*(x_)], x_Symbol] :> Simp[-ArcTanh[Cos[c + d*x]]/d, x] /; FreeQ[{c, d}, x]
Int[(csc[(e_.) + (f_.)*(x_)]*(d_.))^(n_.)*(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_))^2, x_Symbol] :> Simp[2*a*(b/d) Int[(d*Csc[e + f*x])^(n + 1), x], x] + Int[(d*Csc[e + f*x])^n*(a^2 + b^2*Csc[e + f*x]^2), x] /; FreeQ[{a, b, d, e, f, n}, x]
Int[csc[(e_.) + (f_.)*(x_)]*(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_))^(m_)*(cs c[(e_.) + (f_.)*(x_)]*(B_.) + (A_)), x_Symbol] :> Simp[(-B)*Cot[e + f*x]*(( a + b*Csc[e + f*x])^m/(f*(m + 1))), x] + Simp[(a*B*m + A*b*(m + 1))/(b*(m + 1)) Int[Csc[e + f*x]*(a + b*Csc[e + f*x])^m, x], x] /; FreeQ[{a, b, A, B , e, f, m}, x] && NeQ[A*b - a*B, 0] && EqQ[a^2 - b^2, 0] && NeQ[a*B*m + A*b *(m + 1), 0] && !LtQ[m, -2^(-1)]
Int[csc[(e_.) + (f_.)*(x_)]^2*(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_))^(m_)*( csc[(e_.) + (f_.)*(x_)]*(B_.) + (A_)), x_Symbol] :> Simp[(-B)*Cot[e + f*x]* ((a + b*Csc[e + f*x])^(m + 1)/(b*f*(m + 2))), x] + Simp[1/(b*(m + 2)) Int [Csc[e + f*x]*(a + b*Csc[e + f*x])^m*Simp[b*B*(m + 1) + (A*b*(m + 2) - a*B) *Csc[e + f*x], x], x], x] /; FreeQ[{a, b, e, f, A, B, m}, x] && NeQ[A*b - a *B, 0] && !LtQ[m, -1]
Int[(csc[(e_.) + (f_.)*(x_)]*(b_.))^(m_.)*(csc[(e_.) + (f_.)*(x_)]^2*(C_.) + (A_)), x_Symbol] :> Simp[(-C)*Cot[e + f*x]*((b*Csc[e + f*x])^m/(f*(m + 1) )), x] + Simp[(C*m + A*(m + 1))/(m + 1) Int[(b*Csc[e + f*x])^m, x], x] /; FreeQ[{b, e, f, A, C, m}, x] && NeQ[C*m + A*(m + 1), 0] && !LeQ[m, -1]
Time = 3.88 (sec) , antiderivative size = 150, normalized size of antiderivative = 1.09
method | result | size |
parts | \(-\frac {\left (A \,a^{2}+2 B \,a^{2}\right ) \left (-\frac {2}{3}-\frac {\sec \left (d x +c \right )^{2}}{3}\right ) \tan \left (d x +c \right )}{d}+\frac {\left (2 A \,a^{2}+B \,a^{2}\right ) \left (\frac {\sec \left (d x +c \right ) \tan \left (d x +c \right )}{2}+\frac {\ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{2}\right )}{d}+\frac {A \,a^{2} \tan \left (d x +c \right )}{d}+\frac {B \,a^{2} \left (-\left (-\frac {\sec \left (d x +c \right )^{3}}{4}-\frac {3 \sec \left (d x +c \right )}{8}\right ) \tan \left (d x +c \right )+\frac {3 \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{8}\right )}{d}\) | \(150\) |
norman | \(\frac {\frac {11 a^{2} \left (8 A +7 B \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{5}}{12 d}-\frac {a^{2} \left (8 A +7 B \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{7}}{4 d}+\frac {a^{2} \left (24 A +25 B \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{4 d}-\frac {a^{2} \left (136 A +83 B \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3}}{12 d}}{\left (-1+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}\right )^{4}}-\frac {a^{2} \left (8 A +7 B \right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}{8 d}+\frac {a^{2} \left (8 A +7 B \right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}{8 d}\) | \(175\) |
parallelrisch | \(\frac {14 \left (-\frac {6 \left (A +\frac {7 B}{8}\right ) \left (\frac {3}{4}+\frac {\cos \left (4 d x +4 c \right )}{4}+\cos \left (2 d x +2 c \right )\right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}{7}+\frac {6 \left (A +\frac {7 B}{8}\right ) \left (\frac {3}{4}+\frac {\cos \left (4 d x +4 c \right )}{4}+\cos \left (2 d x +2 c \right )\right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}{7}+\left (A +\frac {8 B}{7}\right ) \sin \left (2 d x +2 c \right )+\left (\frac {3 A}{7}+\frac {3 B}{8}\right ) \sin \left (3 d x +3 c \right )+\left (\frac {5 A}{14}+\frac {2 B}{7}\right ) \sin \left (4 d x +4 c \right )+\frac {3 \left (A +\frac {15 B}{8}\right ) \sin \left (d x +c \right )}{7}\right ) a^{2}}{3 d \left (\cos \left (4 d x +4 c \right )+4 \cos \left (2 d x +2 c \right )+3\right )}\) | \(178\) |
derivativedivides | \(\frac {-A \,a^{2} \left (-\frac {2}{3}-\frac {\sec \left (d x +c \right )^{2}}{3}\right ) \tan \left (d x +c \right )+B \,a^{2} \left (-\left (-\frac {\sec \left (d x +c \right )^{3}}{4}-\frac {3 \sec \left (d x +c \right )}{8}\right ) \tan \left (d x +c \right )+\frac {3 \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{8}\right )+2 A \,a^{2} \left (\frac {\sec \left (d x +c \right ) \tan \left (d x +c \right )}{2}+\frac {\ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{2}\right )-2 B \,a^{2} \left (-\frac {2}{3}-\frac {\sec \left (d x +c \right )^{2}}{3}\right ) \tan \left (d x +c \right )+A \,a^{2} \tan \left (d x +c \right )+B \,a^{2} \left (\frac {\sec \left (d x +c \right ) \tan \left (d x +c \right )}{2}+\frac {\ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{2}\right )}{d}\) | \(187\) |
default | \(\frac {-A \,a^{2} \left (-\frac {2}{3}-\frac {\sec \left (d x +c \right )^{2}}{3}\right ) \tan \left (d x +c \right )+B \,a^{2} \left (-\left (-\frac {\sec \left (d x +c \right )^{3}}{4}-\frac {3 \sec \left (d x +c \right )}{8}\right ) \tan \left (d x +c \right )+\frac {3 \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{8}\right )+2 A \,a^{2} \left (\frac {\sec \left (d x +c \right ) \tan \left (d x +c \right )}{2}+\frac {\ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{2}\right )-2 B \,a^{2} \left (-\frac {2}{3}-\frac {\sec \left (d x +c \right )^{2}}{3}\right ) \tan \left (d x +c \right )+A \,a^{2} \tan \left (d x +c \right )+B \,a^{2} \left (\frac {\sec \left (d x +c \right ) \tan \left (d x +c \right )}{2}+\frac {\ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{2}\right )}{d}\) | \(187\) |
risch | \(-\frac {i a^{2} \left (24 A \,{\mathrm e}^{7 i \left (d x +c \right )}+21 B \,{\mathrm e}^{7 i \left (d x +c \right )}-24 A \,{\mathrm e}^{6 i \left (d x +c \right )}+24 A \,{\mathrm e}^{5 i \left (d x +c \right )}+45 B \,{\mathrm e}^{5 i \left (d x +c \right )}-120 A \,{\mathrm e}^{4 i \left (d x +c \right )}-96 B \,{\mathrm e}^{4 i \left (d x +c \right )}-24 A \,{\mathrm e}^{3 i \left (d x +c \right )}-45 B \,{\mathrm e}^{3 i \left (d x +c \right )}-136 A \,{\mathrm e}^{2 i \left (d x +c \right )}-128 B \,{\mathrm e}^{2 i \left (d x +c \right )}-24 \,{\mathrm e}^{i \left (d x +c \right )} A -21 B \,{\mathrm e}^{i \left (d x +c \right )}-40 A -32 B \right )}{12 d \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )^{4}}-\frac {a^{2} \ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right ) A}{d}-\frac {7 a^{2} \ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right ) B}{8 d}+\frac {a^{2} \ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right ) A}{d}+\frac {7 a^{2} \ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right ) B}{8 d}\) | \(274\) |
-(A*a^2+2*B*a^2)/d*(-2/3-1/3*sec(d*x+c)^2)*tan(d*x+c)+(2*A*a^2+B*a^2)/d*(1 /2*sec(d*x+c)*tan(d*x+c)+1/2*ln(sec(d*x+c)+tan(d*x+c)))+A*a^2/d*tan(d*x+c) +B*a^2/d*(-(-1/4*sec(d*x+c)^3-3/8*sec(d*x+c))*tan(d*x+c)+3/8*ln(sec(d*x+c) +tan(d*x+c)))
Time = 0.28 (sec) , antiderivative size = 145, normalized size of antiderivative = 1.05 \[ \int \sec ^2(c+d x) (a+a \sec (c+d x))^2 (A+B \sec (c+d x)) \, dx=\frac {3 \, {\left (8 \, A + 7 \, B\right )} a^{2} \cos \left (d x + c\right )^{4} \log \left (\sin \left (d x + c\right ) + 1\right ) - 3 \, {\left (8 \, A + 7 \, B\right )} a^{2} \cos \left (d x + c\right )^{4} \log \left (-\sin \left (d x + c\right ) + 1\right ) + 2 \, {\left (8 \, {\left (5 \, A + 4 \, B\right )} a^{2} \cos \left (d x + c\right )^{3} + 3 \, {\left (8 \, A + 7 \, B\right )} a^{2} \cos \left (d x + c\right )^{2} + 8 \, {\left (A + 2 \, B\right )} a^{2} \cos \left (d x + c\right ) + 6 \, B a^{2}\right )} \sin \left (d x + c\right )}{48 \, d \cos \left (d x + c\right )^{4}} \]
1/48*(3*(8*A + 7*B)*a^2*cos(d*x + c)^4*log(sin(d*x + c) + 1) - 3*(8*A + 7* B)*a^2*cos(d*x + c)^4*log(-sin(d*x + c) + 1) + 2*(8*(5*A + 4*B)*a^2*cos(d* x + c)^3 + 3*(8*A + 7*B)*a^2*cos(d*x + c)^2 + 8*(A + 2*B)*a^2*cos(d*x + c) + 6*B*a^2)*sin(d*x + c))/(d*cos(d*x + c)^4)
\[ \int \sec ^2(c+d x) (a+a \sec (c+d x))^2 (A+B \sec (c+d x)) \, dx=a^{2} \left (\int A \sec ^{2}{\left (c + d x \right )}\, dx + \int 2 A \sec ^{3}{\left (c + d x \right )}\, dx + \int A \sec ^{4}{\left (c + d x \right )}\, dx + \int B \sec ^{3}{\left (c + d x \right )}\, dx + \int 2 B \sec ^{4}{\left (c + d x \right )}\, dx + \int B \sec ^{5}{\left (c + d x \right )}\, dx\right ) \]
a**2*(Integral(A*sec(c + d*x)**2, x) + Integral(2*A*sec(c + d*x)**3, x) + Integral(A*sec(c + d*x)**4, x) + Integral(B*sec(c + d*x)**3, x) + Integral (2*B*sec(c + d*x)**4, x) + Integral(B*sec(c + d*x)**5, x))
Time = 0.23 (sec) , antiderivative size = 230, normalized size of antiderivative = 1.67 \[ \int \sec ^2(c+d x) (a+a \sec (c+d x))^2 (A+B \sec (c+d x)) \, dx=\frac {16 \, {\left (\tan \left (d x + c\right )^{3} + 3 \, \tan \left (d x + c\right )\right )} A a^{2} + 32 \, {\left (\tan \left (d x + c\right )^{3} + 3 \, \tan \left (d x + c\right )\right )} B a^{2} - 3 \, B a^{2} {\left (\frac {2 \, {\left (3 \, \sin \left (d x + c\right )^{3} - 5 \, \sin \left (d x + c\right )\right )}}{\sin \left (d x + c\right )^{4} - 2 \, \sin \left (d x + c\right )^{2} + 1} - 3 \, \log \left (\sin \left (d x + c\right ) + 1\right ) + 3 \, \log \left (\sin \left (d x + c\right ) - 1\right )\right )} - 24 \, A a^{2} {\left (\frac {2 \, \sin \left (d x + c\right )}{\sin \left (d x + c\right )^{2} - 1} - \log \left (\sin \left (d x + c\right ) + 1\right ) + \log \left (\sin \left (d x + c\right ) - 1\right )\right )} - 12 \, B a^{2} {\left (\frac {2 \, \sin \left (d x + c\right )}{\sin \left (d x + c\right )^{2} - 1} - \log \left (\sin \left (d x + c\right ) + 1\right ) + \log \left (\sin \left (d x + c\right ) - 1\right )\right )} + 48 \, A a^{2} \tan \left (d x + c\right )}{48 \, d} \]
1/48*(16*(tan(d*x + c)^3 + 3*tan(d*x + c))*A*a^2 + 32*(tan(d*x + c)^3 + 3* tan(d*x + c))*B*a^2 - 3*B*a^2*(2*(3*sin(d*x + c)^3 - 5*sin(d*x + c))/(sin( d*x + c)^4 - 2*sin(d*x + c)^2 + 1) - 3*log(sin(d*x + c) + 1) + 3*log(sin(d *x + c) - 1)) - 24*A*a^2*(2*sin(d*x + c)/(sin(d*x + c)^2 - 1) - log(sin(d* x + c) + 1) + log(sin(d*x + c) - 1)) - 12*B*a^2*(2*sin(d*x + c)/(sin(d*x + c)^2 - 1) - log(sin(d*x + c) + 1) + log(sin(d*x + c) - 1)) + 48*A*a^2*tan (d*x + c))/d
Time = 0.31 (sec) , antiderivative size = 212, normalized size of antiderivative = 1.54 \[ \int \sec ^2(c+d x) (a+a \sec (c+d x))^2 (A+B \sec (c+d x)) \, dx=\frac {3 \, {\left (8 \, A a^{2} + 7 \, B a^{2}\right )} \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 1 \right |}\right ) - 3 \, {\left (8 \, A a^{2} + 7 \, B a^{2}\right )} \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 1 \right |}\right ) - \frac {2 \, {\left (24 \, A a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{7} + 21 \, B a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{7} - 88 \, A a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} - 77 \, B a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 136 \, A a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 83 \, B a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 72 \, A a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 75 \, B a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right )}}{{\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 1\right )}^{4}}}{24 \, d} \]
1/24*(3*(8*A*a^2 + 7*B*a^2)*log(abs(tan(1/2*d*x + 1/2*c) + 1)) - 3*(8*A*a^ 2 + 7*B*a^2)*log(abs(tan(1/2*d*x + 1/2*c) - 1)) - 2*(24*A*a^2*tan(1/2*d*x + 1/2*c)^7 + 21*B*a^2*tan(1/2*d*x + 1/2*c)^7 - 88*A*a^2*tan(1/2*d*x + 1/2* c)^5 - 77*B*a^2*tan(1/2*d*x + 1/2*c)^5 + 136*A*a^2*tan(1/2*d*x + 1/2*c)^3 + 83*B*a^2*tan(1/2*d*x + 1/2*c)^3 - 72*A*a^2*tan(1/2*d*x + 1/2*c) - 75*B*a ^2*tan(1/2*d*x + 1/2*c))/(tan(1/2*d*x + 1/2*c)^2 - 1)^4)/d
Time = 16.07 (sec) , antiderivative size = 183, normalized size of antiderivative = 1.33 \[ \int \sec ^2(c+d x) (a+a \sec (c+d x))^2 (A+B \sec (c+d x)) \, dx=\frac {\left (-2\,A\,a^2-\frac {7\,B\,a^2}{4}\right )\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^7+\left (\frac {22\,A\,a^2}{3}+\frac {77\,B\,a^2}{12}\right )\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5+\left (-\frac {34\,A\,a^2}{3}-\frac {83\,B\,a^2}{12}\right )\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3+\left (6\,A\,a^2+\frac {25\,B\,a^2}{4}\right )\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{d\,\left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^8-4\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6+6\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4-4\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+1\right )}+\frac {2\,a^2\,\mathrm {atanh}\left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )\,\left (A+\frac {7\,B}{8}\right )}{d} \]
(tan(c/2 + (d*x)/2)*(6*A*a^2 + (25*B*a^2)/4) - tan(c/2 + (d*x)/2)^7*(2*A*a ^2 + (7*B*a^2)/4) + tan(c/2 + (d*x)/2)^5*((22*A*a^2)/3 + (77*B*a^2)/12) - tan(c/2 + (d*x)/2)^3*((34*A*a^2)/3 + (83*B*a^2)/12))/(d*(6*tan(c/2 + (d*x) /2)^4 - 4*tan(c/2 + (d*x)/2)^2 - 4*tan(c/2 + (d*x)/2)^6 + tan(c/2 + (d*x)/ 2)^8 + 1)) + (2*a^2*atanh(tan(c/2 + (d*x)/2))*(A + (7*B)/8))/d